package com.dy.cloud.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.UUID;

/**
 * @ClassName:
 * @Author: 仄言in
 * @Desctiption: (描述)
 * @Date: 2021/9/14 10:31
 * @Version 1.0 (版本)
 */
@RestController
@RequestMapping("/payment")
@Slf4j
public class PaymentController {
    @Value("${server.port}")
    private String serverport;

    /**
     * 测试consul服务
     * @return
     **/
    @GetMapping("/consul")
    public String paymentConsul(){
        System.out.println("serverport = " + serverport);
        return "springcloud with consul: "+serverport+"\t"+ UUID.randomUUID().toString();
    }

}
